# frozen_string_literal: true

# See https://docs.gitlab.com/ee/development/database/batched_background_migrations.html
# for more information on how to use batched background migrations

# Update below commented lines with appropriate values.

module EE
  module Gitlab
    module BackgroundMigration
      module MyBatchedMigration
        extend ActiveSupport::Concern
        extend ::Gitlab::Utils::Override

        prepended do
          # operation_name :my_operation # This is used as the key on collecting metrics
          # scope_to ->(relation) { relation.where(column: "value") }
        end

        override :perform
        def perform
          each_sub_batch do |sub_batch|
            # Your action on each sub_batch
          end
        end
      end
    end
  end
end
